package io.renren.system.security.service;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 验证码
 */
public interface CaptchaService {

    /**
     * 生成图片验证码
     *
     * @param response
     * @param uuid
     * @throws IOException
     */
    void create(HttpServletResponse response, String uuid) throws IOException;

    /**
     * 效验验证码
     *
     * @param uuid
     * @param code
     * @return
     */
    boolean validate(String uuid, String code);
}
